﻿#region Header

/*
    This file is part of NDoctor.

    NDoctor is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    NDoctor is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with NDoctor.  If not, see <http://www.gnu.org/licenses/>.
*/

#endregion Header

namespace Probel.AspTest.Domain.Components
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    using Probel.AspTest.Domain.Entities;

    public interface IHomeComponent
    {
        #region Methods

        /// <summary>
        /// Gets the number of statistics entries contained in the database.
        /// </summary>
        /// <returns>The number of statistics entries in the database</returns>
        Double CountStatistics();

        /// <summary>
        /// Counts the users registered in the database.
        /// </summary>
        /// <returns></returns>
        double CountUsers();

        /// <summary>
        /// Gets the list of all statistics.
        /// </summary>
        /// <returns>A list with all the statistics</returns>
        IEnumerable<StatisticEntry> GetAllStatistics();

        /// <summary>
        /// Gets all users stored in the database.
        /// </summary>
        /// <returns></returns>
        IEnumerable<AnonymousUser> GetAllUsers();

        /// <summary>
        /// Gets the first inscription.
        /// </summary>
        /// <returns>The date of the first inscription</returns>
        DateTime GetFirstInstallation();

        /// <summary>
        /// Gets the last inscription.
        /// </summary>
        /// <returns>The date of the last inscription</returns>
        DateTime GetLastInstallation();

        /// <summary>
        /// Get the date and the time of the last update.
        /// </summary>
        /// <returns>A <see cref="DateTime"/> representing the last update of the statistics</returns>
        DateTime GetLastUpdate();

        #endregion Methods
    }
}